<!DOCTYPE html>
<html>
    <head>
        <meta charest="UTF-8">
        <title>变量的作用域</title>
    </head>
    <body>
    <script>
        var a='one';
        function test(){
            var a='two';
            console.log(a);
        }
        test();
        console.log(a);
    </script>
</body>
</html>